<?
	foreach ($slider as $key => $item) {
		if ($key == 0) {
			$selectors = '<div class="slyder_active" slide="'.$key.'">'.($key+1).'</div>';
			$titles = '<h1 style="color: #fff;" slide="'.$key.'">'.$item->title.'</h1>';
			$texts = '<p class="text_12" style="color: #fff; margin-bottom: 0.5em;" slide="'.$key.'">'.$item->text.'</p>';
			$links = '<a href="'.$item->link.'" slide="'.$key.'">Подробнее</a>';
			$images = '<div class="banner_image" style="background-image: url('.URL::site('static/uploads/slider/normal/'.$item->image).')" slide="'.$key.'"></div>';
		} else {
			$selectors .= '<div class="slyder" slide="'.$key.'">'.($key+1).'</div>';
			$titles .= '<h1 style="color: #fff; display: none" slide="'.$key.'">'.$item->title.'</h1>';
			$texts .= '<p class="text_12" style="color: #fff; margin-bottom: 0.5em; display: none" slide="'.$key.'">'.$item->text.'</p>';
			$links .= '<a href="'.$item->link.'" style="display: none" slide="'.$key.'">Подробнее</a>';
			$images .= '<div class="banner_image" style="display: none; background-image: url('.URL::site('static/uploads/slider/normal/'.$item->image).')" slide="'.$key.'"></div>';
		}
	}
?>

<div class="banner_cont">
	<div class="slyder_cont">
		<?= $selectors ?>
	</div>
	<div class="banner_text">
		<?= $titles ?>
		<?= $texts ?>
		<?= $links ?>
	</div>
	<div class="banner_devide"></div>
	<?= $images ?>
</div>
<div class="shadow"></div>
<div class="body-container">
	<div class="body_left">
		<h1><?= $sitetext['contact_information']['_value'] ?></h1>
		<p><?= $sitetext['full_phone']['_value'] ?><br /><?= $sitetext['full_address']['_value'] ?></p>
		<div id="map" style="width: 240px; height: 240px"></div>
		<br /><small><a href="javascript:void(0)" onclick="openModal()" class="close_map"><?= $sitetext['see_large_map']['_value'] ?></a></small>
		<div class="subscribe">
			<h1 style="margin-top: 45px;"><?= $sitetext['subscribe_on_subscribe']['_value'] ?></h1>
			<div class="search_cont" style="float: left">
				<input type="text" class="search_field" placeholder="<?= $sitetext['enter_your_email']['_value'] ?>" style="width: 127px;" />
				<input type="submit" id="subscribe" class="search_button" value="<?= $sitetext['subscribe']['_value'] ?>" />
				<div></div>
			</div>
		</div>
	</div>
	<div class="body_right">
		<h1><?= $sitetext['about_company']['_value'] ?></h1>
		<p><?= $about->text ?></p>
		<h1 style="margin-top: 45px;"><?= $sitetext['news']['_value'] ?></h1>
		<div class="news_cont">
			<? foreach ($news as $key => $item): ?>
				<div class="news" <?= $key == 0 ? 'style="margin-right: 30px"' : '' ?>>
					<p class="text_12"><? $date = explode(' ', $item->creation_date); echo $date[0] ?></p>
					<a href="<?= URL::site('news/'.$item->id) ?>" class="underline"><?= $item->title ?></a>
					<p class="text_12"><?= Text::limit_words(strip_tags($item->text), 30) ?></p>
				</div>
			<? endforeach ?>
			<div style="clear: both;"></div>
			<div style="margin-top: 15px;"><a href="<?= URL::site('news') ?>" class="underline"><?= $sitetext['all_news']['_value'] ?></a></div>
		</div>
	</div>
</div>
</div>